package com.sfc.sdsr.activity;

import com.sfc.sdsr.R;
import com.sfc.sdsr.service.PullService;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        SharedPreferences sharedPreferences = getSharedPreferences("SfcAppPrefs",MODE_PRIVATE);
        Editor editor = sharedPreferences.edit();

        editor.putString("SERVER", "10.5.0.178");
        editor.putInt("PORT", 4444);

        editor.commit();
        
        startService(new Intent(this, PullService.class));
	}
	
    public void bulletinsClick(View view) {
        startActivity(new Intent(this, BulletinActivity.class));
    }   

    public void eventsClick(View view) {
        startActivity(new Intent(this, EventsActivity.class));
	}
    
    public void membersClick(View view) {
        startActivity(new Intent(this, MembersActivity.class));
    }   
    
    public void gloryBookClick(View view) {
        startActivity(new Intent(this, GloryBookActivity.class));
    }   
    
}